home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form DriveInfo
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "Drive Information"
- ClientHeight = 4410
- ClientLeft = 3030
- ClientTop = 2130
- ClientWidth = 3405
- ControlBox = 0 'False
- Height = 4815
- Left = 2970
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4410
- ScaleWidth = 3405
- Top = 1785
- Width = 3525
- Begin CommandButton Command1
- BackColor = &H00C0C0C0&
- Cancel = -1 'True
- Caption = "O &K A Y"
- Default = -1 'True
- Height = 375
- Left = 240
- TabIndex = 7
- Top = 3840
- Width = 2895
- End
- Begin DriveListBox Drive1
- Height = 315
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 2895
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 9
- Left = 1800
- TabIndex = 21
- Top = 3360
- Width = 1335
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Substituted Drive:"
- Height = 255
- Index = 9
- Left = 240
- TabIndex = 20
- Top = 3360
- Width = 1575
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 8
- Left = 1800
- TabIndex = 19
- Top = 3120
- Width = 1335
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 7
- Left = 1800
- TabIndex = 18
- Top = 2880
- Width = 1335
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 6
- Left = 1800
- TabIndex = 17
- Top = 2640
- Width = 1335
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "CD Drive:"
- Height = 255
- Index = 8
- Left = 240
- TabIndex = 16
- Top = 3120
- Width = 1575
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Local Drive:"
- Height = 255
- Index = 7
- Left = 240
- TabIndex = 15
- Top = 2880
- Width = 1575
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Removable Drive:"
- Height = 255
- Index = 6
- Left = 240
- TabIndex = 14
- Top = 2640
- Width = 1575
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 5
- Left = 1800
- TabIndex = 13
- Top = 2160
- Width = 1335
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 4
- Left = 1800
- TabIndex = 12
- Top = 1920
- Width = 1335
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 3
- Left = 1800
- TabIndex = 11
- Top = 1680
- Width = 1335
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Bytes/Sector:"
- Height = 255
- Index = 5
- Left = 240
- TabIndex = 10
- Top = 2160
- Width = 1575
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Sectors/Cluster:"
- Height = 255
- Index = 4
- Left = 240
- TabIndex = 9
- Top = 1920
- Width = 1575
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Clusters/Drive:"
- Height = 255
- Index = 3
- Left = 240
- TabIndex = 8
- Top = 1680
- Width = 1575
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 2
- Left = 1560
- TabIndex = 6
- Top = 1200
- Width = 1575
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 1
- Left = 1560
- TabIndex = 5
- Top = 960
- Width = 1575
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Label2"
- Height = 255
- Index = 0
- Left = 1560
- TabIndex = 4
- Top = 720
- Width = 1575
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Total Free:"
- Height = 255
- Index = 2
- Left = 240
- TabIndex = 3
- Top = 1200
- Width = 1215
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Total Used:"
- Height = 255
- Index = 1
- Left = 240
- TabIndex = 2
- Top = 960
- Width = 1215
- End
- Begin Label Label1
- BackStyle = 0 'Transparent
- Caption = "Total Size:"
- Height = 255
- Index = 0
- Left = 240
- TabIndex = 1
- Top = 720
- Width = 1215
- End
- Sub CheckDriveTypes (Drive%)
- d% = IsDriveRemovable(Drive%)
- GoSub GetWord: label2(6).Caption = Word$
- d% = IsDriveLocal(Drive%)
- GoSub GetWord: label2(7).Caption = Word$
- d% = IsDriveCD(Drive%)
- GoSub GetWord: label2(8).Caption = Word$
- d% = IsDriveSubst(Drive%)
- GoSub GetWord: label2(9).Caption = Word$
- Exit Sub
- GetWord:
- If d% = False Then
- Word$ = "no"
- ElseIf d% = True Then Word$ = "yes"
- Else
- Word$ = "invalid"
- End If
- Return
- End Sub
- Sub Command1_Click ()
- Unload Me
- End Sub
- Sub Drive1_Change ()
- StartDrvChg:
- Screen.MousePointer = 11
- DriveLabel$ = UCase$(Drive1.Drive)
- DriveNbr% = Asc(DriveLabel$) - 64
- x& = GetDriveSize(DriveNbr%)
- y& = GetDriveUsed(DriveNbr%)
- z& = GetDriveFree(DriveNbr%)
- a& = GetClustersOnDrive(DriveNbr%)
- b& = GetSectorsPerCluster(DriveNbr%)
- c& = GetBytesPerSector(DriveNbr%)
- Screen.MousePointer = 0
- If x& = 0 Then
- MsgBox "Unavailable drive!", 16, "Drive Error"
- drv% = GetDefaultDrive()
- Drive1.Drive = UCase$(Chr$(drv% + 64))
- GoTo StartDrvChg
- End If
- label2(0).Caption = Format$(x& / 1024, "###,###,##0") + " KB"
- label2(1).Caption = Format$(y& / 1024, "###,###,##0") + " KB"
- label2(2).Caption = Format$(z& / 1024, "###,###,##0") + " KB"
- label2(3).Caption = Format$(a&, "###,###,##0")
- label2(4).Caption = Format$(b&, "###,###,##0")
- label2(5).Caption = Format$(c&, "###,###,##0")
- CheckDriveTypes DriveNbr%
- End Sub
- Sub Form_Load ()
- FormCenterForm Me, DemoMain
- dd% = GetDefaultDrive()
- Drive1.Drive = Chr$(dd% + 64)
- x& = GetDriveSize(0)
- y& = GetDriveUsed(0)
- z& = GetDriveFree(0)
- a& = GetClustersOnDrive(0)
- b& = GetSectorsPerCluster(0)
- c& = GetBytesPerSector(0)
- label2(0).Caption = Format$(x& / 1024, "###,###,##0") + " KB"
- label2(1).Caption = Format$(y& / 1024, "###,###,##0") + " KB"
- label2(2).Caption = Format$(z& / 1024, "###,###,##0") + " KB"
- label2(3).Caption = Format$(a&, "###,###,##0")
- label2(4).Caption = Format$(b&, "###,###,##0")
- label2(5).Caption = Format$(c&, "###,###,##0")
- CheckDriveTypes dd%
- Screen.MousePointer = 0
- End Sub
- Sub Form_Paint ()
- DoForm3D Me, sunken, 1, 5
- End Sub
-